<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8"> </meta>
    <title>Title</title>
</head>
<body>

<form th:action="@{~/customer/save}" method="post">
    <!--这里用th:field也是可以的-->
    name : <input type="text" name="name"  th:value="${cust.name}" /> <br/>
    gender : <input type="text" name="gender" th:field="${cust.gender}" /> <br/>
    telephone : <input type="text" name="telephone"  th:value="${cust.telephone}" /> <br/>
    address : <input type="text" name="address" th:value="${cust.address}"  /> <br/>
    <!--添加一个隐藏域用于确定是添加还是修改-->
    <input type="hidden" name="id" th:field="${cust.id}" />
    <input type="submit" value="Save(&S)"/>


</form>

</body>
</html>